package com.doge.controller.admin;

import com.doge.bean.base.BaseData;
import com.doge.bean.base.BaseParam;
import com.doge.bean.base.BaseRespVo;
import com.doge.service.admin.searchhistory.HistoryServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: project2-wechat-mall
 * @description: 历史搜索
 * @author: zhu lei
 * @create: 2021-11-30 16:21
 **/
@RequestMapping("/admin/history")
@RestController
public class HistoryController {
    @Autowired
    HistoryServiceImpl historyService;

    @RequestMapping("list")
    public BaseRespVo historyList(Integer userId, String keyword, BaseParam baseParam) {
        BaseData baseData = historyService.historyList(userId, keyword, baseParam);
        return BaseRespVo.ok(baseData);
    }
}